//
//  MatchTimeCell.m
//  BigToBig
//
//  Created by 毛丽媛 on 16/8/3.
//  Copyright © 2016年 cn.cloudtp. All rights reserved.
//

#import "MatchTimeCell.h"

@implementation MatchTimeCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}

- (void)createSubViews{
    self.AM = [[UILabel alloc] init];
//    self.AM.backgroundColor = [UIColor yellowColor];
    self.AM.text = @"AM";
    self.AM.font = [UIFont systemFontOfSize:15];
    [self.contentView addSubview:self.AM];
    
    self.PM = [[UILabel alloc] init];
//    self.PM.backgroundColor = [UIColor yellowColor];
    self.PM.font = [UIFont systemFontOfSize:15];
    self.PM.text = @"PM";
    [self.contentView addSubview:self.PM];
    
    
    self.time1 = [[UIButton alloc] init];
    self.time1.layer.borderWidth = 1;
    [self.time1 setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
    self.time1.titleLabel.font = [UIFont systemFontOfSize:10];
    [self.time1 setTitle:@"2016-07-26 09:05-12:20" forState:UIControlStateNormal];
//    self.time1.layer.borderColor = [COLOR_RGBA(217, 217, 217, 1) CGColor];
//    
//    [self.time1 setTitleColor:[UIColor colorWithRed:0.323 green:0.639 blue:1.000 alpha:1.000] forState:UIControlStateSelected];
    
    [self.contentView addSubview:self.time1];
    
    self.time2 = [[UIButton alloc] init];
    self.time2.layer.borderWidth = 1;
    [self.time2 setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
//    [self.time2 setTitleColor:[UIColor colorWithRed:0.323 green:0.639 blue:1.000 alpha:1.000] forState:UIControlStateSelected];
    self.time2.titleLabel.font = [UIFont systemFontOfSize:10];
    [self.time2 setTitle:@"2016-07-26 09:05-12:20" forState:UIControlStateNormal];
//    self.time2.layer.borderColor = [COLOR_RGBA(217, 217, 217, 1) CGColor];
    [self.contentView addSubview:self.time2];
    
    self.time3 = [[UIButton alloc] init];
    self.time3.layer.borderWidth = 1;
    [self.time3 setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
//    [self.time3 setTitleColor:[UIColor colorWithRed:0.323 green:0.639 blue:1.000 alpha:1.000] forState:UIControlStateSelected];
    self.time3.titleLabel.font = [UIFont systemFontOfSize:10];
    [self.time3 setTitle:@"2016-07-26 09:05-12:20" forState:UIControlStateNormal];
//    self.time3.layer.borderColor = [COLOR_RGBA(217, 217, 217, 1) CGColor];
    [self.contentView addSubview:self.time3];
    
    self.time4 = [[UIButton alloc] init];
    self.time4.layer.borderWidth = 1;
    [self.time4 setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
//    [self.time4 setTitleColor:[UIColor colorWithRed:0.323 green:0.639 blue:1.000 alpha:1.000] forState:UIControlStateSelected];
    self.time4.titleLabel.font = [UIFont systemFontOfSize:10];
    [self.time4 setTitle:@"2016-07-26 09:05-12:20" forState:UIControlStateNormal];
//    self.time4.layer.borderColor = [COLOR_RGBA(217, 217, 217, 1) CGColor];
    [self.contentView addSubview:self.time4];
    
    
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.AM.frame = CGRectMake(10, 20, 25, 25);
    self.PM.frame = CGRectMake(10, self.AM.maxY + 30, 25, 25);
    self.time1.frame = CGRectMake(self.AM.maxX + 5, 20, (kScreenWidth - 60)/2, 30);
    self.time2.frame = CGRectMake(self.time1.maxX + 7, 20, (kScreenWidth - 60)/2, 30);
    self.time3.frame = CGRectMake(self.PM.maxX + 5, self.PM.y, (kScreenWidth - 60)/2, 30);
    self.time4.frame = CGRectMake(self.time3.maxX + 7, self.PM.y, (kScreenWidth - 60)/2, 30);
    
    //self.SignUp.frame = CGRectMake(kScreenWidth - 120, self.PM.maxY + 20, 100, 30);
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
